home *** CD-ROM | disk | FTP | other *** search
- Q: Why are there separate startup procedures for
- applications and desk accessories (apstart.s and accstart.s)?
-
- A: A desk accessory is started up automatically when GEM is
- booted, and becomes more or less part of the system. An
- application is only run at the user's request, after the system
- has finished loading. Since they start at different times, they
- have a different "environment" to contend with. For instance, the
- application startup code has to release memory following the
- program, while the accessory has this done for it by GEM.
-
- Q: Can a desk accessory use a resource?
-
- A: In general, no. This is because the accessories are
- loaded at system initialization time. If one later makes a
- rsrc_load() call for its resource, the system would allocate the
- resource's buffer in the user area of memory. This would result
- in a memory allocation error when the next application attempted
- to run.
-
- However, it is still possible to use AES object trees within
- an accessory. You should use the RCS to create the trees, then
- use the C output option to create an image of them. This image
- may be included and compiled in the accessory's source code. At
- run time, you will have to adjust the size of the objects using
- rsrc_obfix(), as well as fix up the inter-structure pointers. You
- can use the source code of STCREATE.C and the discussion of
- resource structure in a prior column as guides.
-
- Q: Are there problems with the -f (floating point) option in
- Alcyon C?
-
- A: Yes, there are a number of bugs in the Alcyon floating
- point library. In many cases, the precision of operations is
- poor. The only solution is to switch to Megamax or Lattice C to
- develop your floating point application.
-
- Q: I've noticed that the HEAD, TAIL, and NEXT pointers in an
- object tree are actually numbers relative to the base of the tree.
- Does this mean that an object must be pre-allocated within the
- tree if I plan to objc_add() it later? Can an application do true
- dynamic allocation of objects without setting aside space in the
- tree?
-
- A: Yes, you must preallocate objects if you want to add them
- without moving the tree from the resource. The alternative is to
- create a working area from your program and copy the tree to be
- altered to this buffer. Then you can allocate new objects
- following those which exist, and link them in. The new objects
- must be created on 24-byte boundaries starting at the root of the
- tree. You do NOT need to copy over structures such as TEDINFOs,
- unless you plan to modify them also.
-
- Q: I am using Hippo C, and I can't get your downloads to
- work. I'm also having problems with the programs in the print
- edition of ANTIC. What's going on?
-
- A: Haba Hippo-C has chosen to ignore a number of ST
- standards, including the normal names and calling sequences of the
- GEM VDI and AES calls. It also uses source file formats and an
- underlying operating system which are incompatible with TOS and
- the Developer's Kit. Due to a lack of time, and a desire to
- promote standardization, I will not be supporting Hippo C in this
- column. If you don't want to switch to Toolkit (Alcyon), Lattice,
- or Megamax C, you will have to translate the GEM calls from the
- downloads to the Hippo equivalents and probably retype the source
- code into the Hippo editor.
-
- Q: I'm using the Atari Developer's Kit, and LINK68 seems to
- crash when my programs get large. Is this a bug?
-
- A: Yes, there is a known bug in using Alcyon C and LINK68
- when a program's code area approaches 64K. It appears that jump
- tables generated by SWITCH and GOTO statements are not being
- properly relocated. Often the difficulty can be avoided by
- putting such modules at the start of the link. Otherwise, you
- will need to to recode SWITCH statements as IFs, and eliminate the
- GOTOs (a good practice anyway).
- ə